package org.peoplesearch.storer;

import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.ConcurrentSkipListSet;

public class SetIdStore implements IdStore {

    private Set<Long> set = new ConcurrentSkipListSet<Long>();

    public void put(long id) {
        set.add(id);
    }

    public boolean contains(long id) {
        return set.contains(id);
    }

    public Iterator<Long> iterator() {
        return set.iterator();
    }

    public void clear() {
        set.clear();
    }

    public int size() {
        return set.size();
    }

}
